package com.net.xpay.core.utils;

import com.google.gson.*;

/**
 * 2020/5/9 12:36

 */
public class GsonUtil {

    private static final JsonParser JSON_PARSER = new JsonParser();

    private static final Gson GSON = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss")
            .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create();

    public static Gson getGson() {
        return GSON;
    }

    public static JsonElement parse(String json) {
        return JSON_PARSER.parse(json);
    }
}
